﻿@using CSM_SQL;
@using System.Configuration;
@model List<OrderMes>
<section class="shopping-cart">
    <!-- .shopping-cart -->
    <div class="container">
        <div class="row">
            <div class="col-md-12">
               
            </div>
            <hr />
            <div class="col-md-12">
                <br />
                <hr />
                <h1>购买历史</h1>
                <table>
                    <tr>

                        <th></th>
                        <th>产品名</th>
                        <th>产品描述</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>购买时间</th>
                        <th>状态</th>
                    </tr>
                    @foreach (var m in Model)
                    {
                        var path = ConfigurationManager.AppSettings["path"].ToString() + m.goods.Img;
                <tr>
                    <td><img src=@path alt="13" width="100"></td>
                    <td>@m.goods.Name</td>
                    <td><p>@m.goods.Detail</p></td>
                    <td><strong>￥@m.goods.Price</strong></td>
                    <td>@m.order.Amount</td>
                    <td>@m.order.StartTime</td>
                    <td>
                        @if (m.order.State >= 3 && m.assess != null)
    {<span style="color:forestgreen"><i class="icon icon-Bag" aria-hidden="true"></i>已完成</span>}
                        @if (m.order.State >= 3 && m.assess == null)
    {<span style="color:yellowgreen"><i class="icon icon-TV" aria-hidden="true"></i>待评价</span><abbr>&nbsp; &nbsp;   </abbr> <a href="/Home/Evaluate">去评价</a>}
                        @if (m.order.State == 2)
    {<span style="color:tomato"><i class="icon icon-Truck" aria-hidden="true"></i>待签收</span><abbr>&nbsp; &nbsp;   </abbr><a href="/Home/Sign/@m.order.ID">签收</a>}
                        @if (m.order.State == 1)
    {<span style="color:saddlebrown"><i class="icon icon-Watch" aria-hidden="true"></i>待配送</span>}
                        @if (m.order.State == 0)
    {<span style="color:red"><i class="icon icon-Bag" aria-hidden="true"></i>待分配</span>}
                    </td>
                </tr>
                    }

                    
                </table>

            </div>
        </div>

    </div>
    <!-- /.shopping-cart -->
</section>



